<template>
    <div v-example:foo.bar="baz"></div>
</template>
<!-- 自定义指令：v-example vExample -->
<script setup lang="ts">
import { ref } from 'vue'
const foo = ref({
    arg: 'foo',
    modifiers: { bar: true },
    value: "new" /* `baz` 的值 */,
    oldValue: "old" /* 上一次更新时 `baz` 的值 */
})

const vExample = {
    created() {
        console.log('created')
    },
    beforeMount() {
        console.log('beforeMount')
    },

}
</script>

<style scoped></style>